<?php
/* 
 * ********* CVS HEADER ********* 
 * 
 * $RCSfile: admhtmlcommentdel.php,v $ 
 * $Date: 2006/01/27 11:00:11 $ 
 * $Revision: 1.4 $ 
 * 
 * ********* CVS HEADER ********* 
 */
unset($_SESSION['htmlcachecode']);
$query="SELECT html.id,html.code,html.nbcomment FROM hierarchie,html WHERE html.code='$code' AND html.droit=hierarchie.id_groupe AND hierarchie.id_groupe_dessus='$session[id_groupe]' AND html.publier='1' AND html.commentaire='1'";
$result=rportalrequete($query) or rportalerreur($query,"?op=");
if($row=rportalligne($result))
{}else{
	rportalerreur("LA PAGE QUE VOUS ESSAYEZ D'AFFICHER N'EXISTE PAS","?op=");
}
$query="delete from rportal_commentaire where id='$id'";
@rportalrequete($query) or rportalerreur($query,"?op=");
$nb=$row['nbcomment']-1;
$query = "UPDATE html SET nbcomment='$nb' WHERE id='{$row['id']}'";
@rportalrequete($query) or rportalerreur($query,"?op=");
header("Location: ?op=html&code={$row['code']}&commentaire=1");
?>
